package menthod

import (
	"userSrv/global"
	"userSrv/model/entidy"
)

func UserRegister(user entidy.User) (entidy.User, error) {
	err := global.Db.Create(&user).Error
	return user, err
}
func UserLogin(mobile string) (entidy.User, error) {
	var user entidy.User
	err := global.Db.Where("mobile=?", mobile).First(&user).Error
	return user, err
}
